-- GENERATED SPELL FOR [Battle-Mage Dathric] --


function spell0_19543(pUnit, Event) --@Pyroblast,n/a--
pUnit:FullCastSpellOnTarget(17273,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19543', 18000, 1)
end

function spell1_19543(pUnit, Event) --@Torrent of Flames,Self--
pUnit:FullCastSpellOnTarget(36104,pUnit)
pUnit:RegisterEvent('Sorts_19543', 2500, 1)
end

function Sorts_19543(pUnit, Event)
local choix_sorts_19543 = math.random(0, 1)
if choix_sorts_19543 == 0 then
pUnit:RegisterEvent('spell0_19543', 1, 1)
end
if choix_sorts_19543 == 1 then
pUnit:RegisterEvent('spell1_19543', 1, 1)
end
end

function mob19543_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19543', math.random(1500, 3000), 1)
end

function mob19543_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19543_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19543_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19543, 1, 'mob19543_Action')
RegisterUnitEvent(19543, 2, 'mob19543_Leave')
RegisterUnitEvent(19543, 3, 'mob19543_Kill')
RegisterUnitEvent(19543, 4, 'mob19543_Die')
